﻿using MiniFox.Resources;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sys.Core.Models.Dto
{
    /// <summary>
    /// 
    /// </summary>
    public class DeptDto
    {
        /// <summary>
        /// 部门ID
        /// </summary>
        [JsonProperty("deptId")]
        public string? DeptID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [JsonProperty("orgId")]
        public string OrganizationID { get; set; }
        /// <summary>
        /// 父级ID
        /// </summary>
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [JsonProperty("parentDeptId")]
        public string ParentDeptID { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [Required(ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonRequired")]
        [MaxLength(20, ErrorMessageResourceType = typeof(CommonMessages), ErrorMessageResourceName = "MSG_CommonStringLength")]
        [JsonProperty("deptName")]
        public string DeptName { get; set; }
        [JsonIgnore]
        public string? DeptPath { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("director")]
        public string? Director { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("ordinal")]
        public int? Ordinal { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("description")]
        public string? Description { get; set; }
    }
}
